package com.study.group.modules.mongo.service.impl;

import com.study.group.common.entrty.Person;
import com.study.group.modules.mongo.dao.PersonDao;
import com.study.group.modules.mongo.dao.PersonDao2;
import com.study.group.modules.mongo.service.PersonService;
import com.study.group.modules.mongo.service.PersonService2;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description service 类
 * @Author      yanghanwei
 * @Mail        yanghanwei@geotmt.com
 * @Date        2019/4/26 12:02
 * @Version     v1
 **/
@Service
public class PersonService2Impl implements PersonService2 {

    private static final Logger logger = LoggerFactory.getLogger(PersonService2Impl.class);

    @Resource
    private PersonDao2 personDao;


    @Override
    public List<Person> listAll() {
        return personDao.listAll();
    }

    @Override
    public Person saveP(Person person) {
        return personDao.saveP(person);
    }

    @Override
    public List<Person> getByName(String name) {
        return personDao.getByName(name);
    }
}
